Program Type Recognition for Compiler Optimization
ثبت نشده
چکیده
Today’s compilers have too many optimization options, and it is difficult to understand all the details and the interactions between them. Therefore, many application developers simply use the well-known compiler flags (such as -O2, -Os) to compile all their programs; at the other end of the extreme, some researchers focus on customizing the optimizations for each program. The former method is too naive as it treats all kinds of programs in the same way, and some programs might even have performance loss since the compilation options are in fact tuned for the others. The latter approach takes care of the variations of programs and tries to individually tune them to the best. However, since the optimization space is extremely huge, the scalability of this scheme is a problem and also makes this approach less popular for the emerging dynamic optimizing compilers. We attack this problem by exploiting two insights: first, it is feasible to categorize the programs into different classes according to their functionalities and characteristics; second, dynamic profiling information is useful for recognizing the type of a program. With both insights, we present a novel approach for program optimization: first, the programs are categorized into different classes and the class-level optimization decision is made by the domain experts; then, the class of an input program is recognized by the machine learning models and the optimal class-level optimizations are applied to obtain the best performance. We demonstrate that this approach can be applied to a binary translation/optimization system and great performance improvement can be achieved.
منابع مشابه
Program Type Recognition for Compiler Optimization
Today’s compilers have many optimization options, and it is difficult to understand all the details and the interactions between them. Therefore, many application developers simply use the well-known compiler flags to compile all their programs. On the other hand, some researchers focus on customizing the optimizations for each program. The former method may hurt the performance of some program...
متن کاملA Verifiable SSA Program Representation for Aggressive Compiler Optimization Extended
We present a verifiable low-level program representation to embed, propagate, and preserve safety information in high performance compilers for safe languages such as Java and C#. Our representation precisely encodes safety information via static single-assignment (SSA) [11, 3] proof variables that are first-class constructs in the program. We argue that our representation allows a compiler to ...
متن کاملCompiler Optimizations for Low-Level Redundancy Elimination: An Application of Meta-Level Prolog Primitives
Much of the work on applications of meta-level primitives in logic programs focusses on high-level aspects such as source-level program transformation , interpretation, and partial evaluation. In this paper, we show how meta-level primitives can be used in a very simple way for low-level code optimization in compilers. The resulting code optimizer is small, simple, eecient, and easy to modify a...
متن کاملEecient Symbolic Analysis for Optimizing Compilers ?
Because most of the execution time of a program is typically spend in loops, loop optimization is the main target of optimizing and restructuring compilers. An accurate determination of induction variables and dependencies in loops is of paramount importance to many loop optimization and parallelization techniques, such as generalized loop strength reduction, loop parallelization by induction v...
متن کاملCompiler Optimization of C++ Virtual Function Calls
We describe two generic optimization techniques to improve run-time performance of C++ virtual function calls: type specification and type prediction. Both involve program analysis that results in a set of call sites to be optimized, and code transformations that replace the original dispatching mechanism in these sites by more efficient call expressions. We implement two special cases. The fir...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2008